from django.db import models

class User(models.Model):
    name = models.CharField(max_length=50, primary_key=True)
    password = models.CharField(max_length=256,default="")

class efflog(models.Model):
    LogID = models.CharField(max_length=20, primary_key=True)
    LogType = models.CharField(max_length=255)
    OccurTime = models.DateTimeField()
    SourceIp = models.CharField(max_length=255)
    userID = models.CharField(max_length=50)
    Content = models.CharField(max_length=255)
    Level = models.CharField(max_length=20)
    RelatedID = models.CharField(max_length=20)
    Status = models.BooleanField()
    Handler = models.CharField(max_length=20)
    HandleTime = models.DateTimeField()

class sysdata(models.Model):
    CPUusage = models.CharField(max_length=255,primary_key=True)
    MEMusage = models.CharField(max_length=255)
    request = models.CharField(max_length=50)


class SysLog(models.Model):
    LogID = models.CharField(max_length=255, primary_key=True)
    logtime = models.CharField(max_length=255)
    cpuusage = models.CharField(max_length=255)
    memusage = models.CharField(max_length=255)
    diskusage = models.CharField(max_length=255)
    netusage = models.CharField(max_length=255)
    temp = models.CharField(max_length=255)
    reason = models.CharField(max_length=255)
